import numpy as np


def calculate_similarity(featureX, featureY):
    """
    计算相似度
    :param featureX:
    :param featureY:
    :return: int (0~1)
    """
    similarityOrg = np.dot(featureX, featureY)
    similarity = similarityOrg * 0.5 + 0.5
    return similarity
